
<template>
<div id="app">
  <mutifork-tree
    :data='list'
    @node-drag-end="changeNode"
    >
  </mutifork-tree>
</div>
</template>
<script>
import { MutiforkTree } from './src/index.js'
export default {
  name: "App",
  components: {
    MutiforkTree
  },
  data () {
    return {
        list: [
            { name: 'baiyang', id: 1, level: 0 },
            { name: 'child1', id: 11, level: 1, pId: 1 },
            { name: 'child-1-1', id: 111, level: 2, pId: 11 },
            { name: 'child2', id: 12, level: 1, pId: 1 },
            { name: 'child-2-1', id: 121, level: 2, pId: 12 },
            { name: 'child-2-2', id: 122, level: 2, pId: 12 },
            { name: 'child3', id: 13, level: 1, pId: 1 },
            { name: 'child-3-1', id: 131, level: 2, pId: 13},
            { name: 'child-3-1-1', id: 1311, level: 2, pId: 131 },
            { name: 'child-3-1-2', id: 1312, level: 2, pId: 131 },
            { name: 'child-3-2', id: 132, level: 2, pId: 13 }
        ]
    }
  },
  methods: {
    changeNode(data) {
    }
  }
}
</script>
